package com.zr.service.impl;
/**
 * 
 * @author CY
 *
 */

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zr.dao.BaseDao;
import com.zr.dao.UserDao;
import com.zr.model.User;
import com.zr.service.UserService;

@Service("userService")
public class UserServiceImpl implements UserService{
	
	@Resource
	private BaseDao<User>  baseDao;
	@Resource
	private  UserDao<User>  userDao;
	@Override
	public User findUserByUserNameAndUserPsw(User user) {
		// TODO Auto-generated method stub
		String hql = "from User u where u.uaccount=? and u.upassword=?";
		return baseDao.get(hql,new Object[]{user.getUaccount(),user.getUpassword()});
	}

}
